﻿using System;

namespace octalforty.Syndication.Core.Rss
{
    /// <summary>
    /// Represents a <see cref="RssChannel"/> in the context of <see cref="RssItem"/>.
    /// </summary>
    public class RssItemSource
    {
        #region Private Member Variables
        private String title = String.Empty;
        private String url = String.Empty;
        #endregion

        #region Public Properties
        /// <summary>
        /// Gets or sets a <see cref="String"/> which contains the name of the RSS channel 
        /// that the item came from.
        /// </summary>
        public String Title
        {
            get { return title; }
            set { title = value; }
        }

        /// <summary>
        /// Gets or sets a <see cref="String"/> which contains the URL to the RSS channel.
        /// </summary>
        public String Url
        {
            get { return url; }
            set { url = value; }
        }
        #endregion

        /// <summary>
        /// Initializes a new instance of <see cref="RssItemSource"/> class.
        /// </summary>
        public RssItemSource()
        {
        }

        /// <summary>
        /// Initializes a new instance of <see cref="RssItemSource"/> class
        /// with a given title and URL.
        /// </summary>
        /// <param name="title">The name of the RSS channel that the item came from.</param>
        /// <param name="url">The URL to the RSS channel.</param>
        public RssItemSource(String title, String url)
        {
            this.title = title;
            this.url = url;
        }
    }
}
